########################################################################
# PLACE LIST CREATIONS HERE #
########################################################################
stage_list = ["summer", "underwater", "flowers",
"mars", "subway","soccerfield"]
head_list = ["head1", "head2", "head3",
"head4", "head5", "head6"]
body_list = ["middle1", "middle2", "middle3",
"middle4", "middle5", "middle6"]
legs_list = ["legs1", "legs2", "legs3",
"legs4", "legs5", "legs6"]
########################################################################
# PLACE ALL OTHER CODE BELOW THIS #
########################################################################
head_image = head_list[3]
display_which_head = codesters.Text(head_image, 100, 83)
head = codesters.Sprite(head_image, 0, 83)
rand_number = random.randint(0,5)
body_image = body_list[rand_number]
display_which_body = codesters.Text(body_image, 100, 0)
body = codesters.Sprite(body_image, 0, 0)
rand_numb2 = random.randint(0,5)
legs_image = legs_list[rand_numb2]
display_which_legs = codesters.Text(legs_image, 100, -83)
legs = codesters.Sprite(legs_image, 0, -83)
stage_index = int(head.ask("Choose an index between 0 and 5."))
stage_image = stage_list[stage_index]
stage.set_background(stage_image)
tester = TestManager()
tester.display_success_message("Great job!")
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)